import mysql.connector
# !/usr/bin/python
# -*- coding: UTF-8 -*-

'''
注释
a = 15
b = 20
print('a - b = ', a - b)
print('a + b =', a + b)
print('a * b =', a * b)
print('a / b = ', a / b)
print('a // b', a // b)
print('a ** b = ', a ** b)
print('a % b =', a % b )
'''

mydb = mysql.connector.connect(
    host="localhost",
    port="8889",
    user="root",
    passwd="root",
    database='zztest'
)

# mydb = mysql.connector.connect(
#     host="localhost",
#     port="3306",
#     user="root",
#     passwd="Zjj123456"
# )

mycursor = mydb.cursor()
mycursor.execute('show tables')
for x in mycursor:
    print(x)

